package dmp.tags

import org.apache.spark.sql.Row

/**
  * author:CN.CDG
  * Date:2019/2/16
  * Time:13:06
  * 地域标签
  **/
object AreaTags extends Tags {
  override def mkTags(args: Any*): List[(String, Int)] = {
    var list=List [(String,Int)]()
    val row = args(0).asInstanceOf[Row]
    //获取需要的字段provincename,cityname
    val provincename = row.getAs[String]("provincename")
    val cityname = row.getAs[String]("cityname")
    if (!"".equals(provincename)) list:+=("ZP"+provincename,1)
    if (!"".equals(cityname)) list:+=("ZC"+cityname,1)
    list
  }
}
